package petshop.agronunes.negocio;

import java.util.List;

import petshop.agronunes.dao.ClienteDAO;
import petshop.agronunes.entidade.Cliente;


public class ClienteBLL {
	
	public Integer insert(Cliente cliente) throws Exception {
		try {
			return new ClienteDAO().insert(cliente);
		} catch (Exception e) {
			throw new Exception(e);
		}
	}
	
	public void update(Cliente cliente) throws Exception {
		try {
			new ClienteDAO().update(cliente);
		} catch (Exception e) {
			throw new Exception(e);
		}
	}
	
	public Cliente GetById(Integer id) throws Exception {
		try {
			return new ClienteDAO().GetById(id);
		} catch (Exception e) {
			throw new Exception(e);
		}
	}
	
	public void delete(Cliente cliente) throws Exception {
		try {
			new ClienteDAO().delete(cliente);
		} catch (Exception e) {
			throw new Exception(e);
		}
	}
	
	public List<Cliente> getAll() throws Exception {
		try {
			return new ClienteDAO().getAll();
		} catch (Exception e) {
			throw new Exception(e);
		}
	}
}
